import React, { useState } from 'react';
import { Input } from 'antd';
import { DatePicker, Space } from 'antd';
import { Select } from 'antd';
import { Button, Menu, Dropdown, Form, Radio } from 'antd';
const { RangePicker } = DatePicker;
import { Table } from 'antd';
const { Option } = Select;
import { history } from 'umi'
import '../absence/detail.css';
// 冯小建--请假查询页

// 表单布局
const formItemLayout = {
  labelCol: {
    // xs: { span: 24 },
    // sm: { span: 8 },
  },
  wrapperCol: {
    xs: { span: 24 },
    sm: { span: 16 },
  },
};

//顶部选择按钮初始状态
const btnStatus = [1, 0];

const columns = [
  {
    title: '提交时间',
    dataIndex: 'release_time',
    width: 160,
  },
  {
    title: '院系',
    dataIndex: 'address',
    width: 90,
  },
  {
    title: '专业',
    dataIndex: 'address',
    width: 90,
  },
  {
    title: '年级',
    dataIndex: 'address',
    width: 90,
  },
   {
    title: '班级',
    dataIndex: 'address',
    width: 90,
  },
  {
    title: '小组',
    dataIndex: 'address',
    width: 90,
  },
  {
    title: '学号',
    dataIndex: 'address',
    width: 90,
  },
  {
    title: '姓名',
    dataIndex: 'address',
    width: 80,
  },
  {
    title: '主题',
    dataIndex: 'address',
    width: 120,
  },
  {
    title: '请假原因',
    dataIndex: 'address',
    width: 90,
  },
  {
    title: '原因说明',
    dataIndex: 'address',
    width: 120,
  },
  {
    title: '请假开始时间',
    dataIndex: 'release_time',
    width: 160,
  },
  {
    title: '请假结束时间',
    dataIndex: 'release_time',
    width: 160,
  },
  {
    title: '审批状态',
    dataIndex: 'address',
    width: 90,
  },
  {
    title: '审批人',
    dataIndex: 'address',
    width: 80,
  },
  {
    title: '操作',
    key: 'operation',
    dataIndex: 'address',
    fixed: 'right',
    width: 100,
    render:(text, record) => (
      <Space size="middle">
        <a onClick={() => history.push('/admin/absence/detail')} >详情</a>
      </Space>
    ),
  },
];

const date_list: readonly any[] | undefined = [];
for (let i = 0; i < 100; i++) {
  date_list.push({
    key: i,
    release_time: `2021.06.16 12:10:2${i}`,
    address: `test ${i}`,
  });
}


const detail = () => {
  // 表单
  const [form] = Form.useForm();
  // 顶部选择按钮
  const [btnStyle, setBtnStyle] = useState(btnStatus);


  // 重置
  const onReset = () => {
    form.resetFields();
  };

  return (
    <div>

      <h1><a onClick={() => history.push('/admin/absence/index')}>请假记录查询</a> > 请假详情</h1>

      
    </div>
  );
};
export default detail;
